package com.yj.springbootrabbitmq.listener;

import com.yj.springbootrabbitmq.pojo.User;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Component
public class Consumer{


    @RabbitListener(queues = "test")
    public void consume(@Payload List<User>msg) {
        System.out.println("consume:"+msg);
    }


}


